package cn.hdu.liang.socket;

import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static void main(String[] args) throws IOException {

        int port = 8962;
        ServerSocket ss = new ServerSocket(port);
        Socket s = ss.accept();
        OutputStream os = s.getOutputStream();
        os.write("hello".getBytes());

        os.close();
        s.close();
        ss.close();
    }
}